Skip to content

Conversation

@LiiNi-coder
Copy link
Contributor

@LiiNi-coder LiiNi-coder commented Jan 24, 2026

🧷 문제 링크

https://www.acmicpc.net/problem/1595

🧭 풀이 시간

55 분

👀 체감 난이도

✏️ 문제 설명

  • 트리의 지름 구하기

🔍 풀이 방법

  • 트리의 지름 : 1. 어느 한 점에서 bfs로 최장거리 가지는 노드 번호p 구하기 / 2. p에서 똑같이 bfs로 최장거리 구하기 그것이 트리의 지름

⏳ 회고

  • putIfAbsent() 사용 습관화하기
  • 트리의 지름 잘 기억하기
  • 모든 두 정점간의 경로가 유일한 그래프 === 트리 임을 기억하기

@ShinHeeEul ShinHeeEul merged commit f9773aa into main Jan 24, 2026
1 check passed
@LiiNi-coder LiiNi-coder added the hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 label Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants